<?php

?>
<html>
<head>
</head>
<body>
<div class="well well span6 offset6">	
	<div class="span7">	
		<form action="upload.php" method="POST" enctype="multipart/form-data">	
			<input type="file" name="my_little_file"/>
			<input type="tekst" name="my_little_file_name"/>
			<input type="submit"/>
		</form>
	</div>
</div>


		<?php
		$iter = new DirectoryIterator('files');
		$files = array();
		$directories = array();
		foreach($iter as $item) {
			if($item->isFile()) {
			$files[] = $item->getFilename();
			} else if ($item->isDir()) {
			$directories[] = $item->getPathname();
			}
		}
		
		foreach($files as $image)
		{
		//print_r($image);
		echo "<img src='files/$image'>" ;
               // echo $_POST['my_little_file_name'];
		}
?>


	<script src="js/jquery-1.8.2.min.js"></script>
	<script src="js/bootstrap.js"></script>
</body>
</html>